package com.qf.fc.Filter;


import lombok.extern.slf4j.Slf4j;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @version 1.0
 * @Author zhangH
 * @Date 2024/12/18 17:57
 */
@Slf4j
//@WebFilter(urlPatterns = "/*")
public class GoFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        Filter.super.init(filterConfig);
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        log.info("拦截到了请求：");
        //放行
        filterChain.doFilter(servletRequest,servletResponse);

        log.info("执行放行后的逻辑。。。");
    }

    @Override
    public void destroy() {
        Filter.super.destroy();
    }
}
